<div id="profile">
    <div class="profile-photo">
        <img src="<?php echo BASE_PATH; ?>/photos/thumbs/<?php echo $profile_photo; ?>" alt="" />
    </div>
    <div class="profile-details">
        <p><span class="bold">Gender:</span> <?php echo $user["User"]["gender"]; ?></p>
        <p><span class="bold">Date of Birth:</span> <?php echo $user["User"]["dob"]; ?></p>
        <p><span class="bold">Location:</span> <?php echo $user["User"]["location"]; ?></p>
        <p><span class="bold">Email:</span> <?php echo $user["User"]["email"]; ?></p>
        <p>
            <?php if (($user["User"]["id"] == $this->session->get("user_id")) || ($this->session->get("role_id") == 1)): ?>
            <a href="<?php echo BASE_PATH; ?>/users/edit/<?php echo $user["User"]["id"]; ?>">(edit)</a>
            <?php endif ?>
            <?php if ($user["User"]["id"] != $this->session->get("user_id")): ?>
                <?php if ($follows): ?>
                <a href="<?php echo BASE_PATH; ?>/users/unfollow/<?php echo $this->session->get("user_id"); ?>/<?php echo $user["User"]["id"]; ?>">(unfollow)</a>
                <?php else: ?>
                <a href="<?php echo BASE_PATH; ?>/users/follow/<?php echo $this->session->get("user_id"); ?>/<?php echo $user["User"]["id"]; ?>">(follow)</a>
                <?php endif ?>
            <?php endif ?>
        </p>
    </div>
    <div class="clear"></div>
</div>
<div id="followers" class="section">
    <h1>Followers</h1>
    <ul class="thumbnails">
        <?php foreach ($followers as $follower): ?>
        <li>
            <a href="<?php echo BASE_PATH; ?>/users/view/<?php echo $follower["User"]["id"]; ?>"><img src="<?php echo BASE_PATH; ?>/photos/thumbs/<?php echo $follower["Photo"]["filename"]; ?>" alt=""/></a>
        </li>
        <?php endforeach ?>
        <div class="clear"></div>
    </ul>
</div>
<div id="following" class="section">
    <h1>Following</h1>
    <ul class="thumbnails">
        <?php foreach ($followings as $following): ?>
        <li>
            <a href="<?php echo BASE_PATH; ?>/users/view/<?php echo $following["User"]["id"]; ?>"><img src="<?php echo BASE_PATH; ?>/photos/thumbs/<?php echo $following["Photo"]["filename"]; ?>" alt=""/></a>
        </li>
        <?php endforeach ?>
        <div class="clear"></div>
    </ul>
</div>